How do I create a team incident report with a date range through API?

Hello PD Community,

I’m interested in querying the PD API endpoint to gather incident information by a specific team that I can use to create a bi-weekly report. The report would require the following details through PD’s REST API:

  • Team involved
  • Date Range (UTC)
  • List of ‘high’ incidents within that date range.

I’ve been working with the pdpyras library in Python and would like to pull out similar data from the following web call:

https://company.pagerduty.com/api/v1/reports/raw/incidents.csv?since=2022-05-01T00%3A00%3A00&until=2023-05-15T23%3A59%3A59&time_zone=Etc%2FUTC&filters[team_ids][]=ABCDEF

Can someone please explain how that would translate to pdpyras query?